import React, { Component } from 'react'
import store from '@/store'
import { observer } from 'mobx-react'
import { Divider } from 'antd'

@observer//监听所有数据变化
class SemiAutomatic extends Component {
  render() {
    return (
      <div>
        <Divider orientation="left">自动监听,取值和使用方法需要引入store,并从store中取</Divider>
        {store.n}
        <button onClick={store.changeData}>+</button>
      </div>
    )
  }
}
export default SemiAutomatic